# Contributor: Devin Lin <espidev@gmail.com>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=kweathercore
pkgver=0.6
pkgrel=0
pkgdesc="Library to facilitate retrieval of weather information including forecasts and alerts"
url="https://invent.kde.org/libraries/kweathercore"
arch="all !armhf" # armhf blocked by qt5-qtlocation-dev
license="LGPL-2.0-or-later AND CC-BY-4.0"
depends_dev="
	kholidays-dev
	ki18n-dev
	qt5-qtbase-dev
	qt5-qtlocation-dev
	"
makedepends="$depends_dev
	extra-cmake-modules
	samurai
	"
source="https://download.kde.org/stable/kweathercore/$pkgver/kweathercore-$pkgver.tar.xz"
options="!check" # No tests
subpackages="$pkgname-dev $pkgname-lang"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
0cc3a5422052fd4d3bedac36c3c017d1ed5c21c4200f6e747dc478bab55f7207d9207a9ea472c340397cd2433a020b92adb6ab39f054b4cd6c72cf01949d18d2  kweathercore-0.6.tar.xz
"
